In some numerically controlled machine tools, an attachment must be changed for each workpiece. Namely, if the workpiece is changed, the attachment must be replaced with a new one. If this attachment includes a movable part moved by a ball screw, a pitch error correction is required for each attachment, and thus pitch error correction data must be reloaded each time the attachment is replaced.
When reloading the pitch error correction data, however, usually a counter or the like, as hardware storing coordinate values, must be initialized, and thus the pitch error correction data must be reloaded while the numerical control device is disconnected from the power supply thereto. In general, although the operator can easily replace the attachment and the like, it is difficult to correctly reload the pitch error correction data after the replacement of the attachment, and therefore, the pitch error correction cannot be normally effected, and thus the machining accuracy is lowered.